import setting from '../config/setting.config';
import { generate } from '@ant-design/colors';
/**
 * 设置组题颜色 css变量实现
 * @param val 颜色值
 */
export function setThemeColor(val: string) {
    const colors = generate(val);
    setting.themeColorVar.forEach(item => {
        document.documentElement.style.setProperty(item.key, colors[item.index as number]);
    });
}